<template>
  <div class="header">
    <div class="f1">
      <div class="container">
        <div class=".left">
          <img
            @click="go('/')"
            src="//game.gtimg.cn/images/yxzj/web201706/images/comm/logo.png"
            alt=""
          />
        </div>
        <ul>
          <li @click="go('/ziliao')">
            <div>游戏资料</div>
            <span>DATA</span>
          </li>
          <li @click="go('/raiders')">
            <div>内容中心</div>
            <span>CONTENTS</span>
          </li>
          <li>
            <div>赛事中心</div>
            <span>MATCH</span>
          </li>
          <li>
            <div>百态王者</div>
            <span>CULTURE</span>
          </li>
          <li>
            <div>社区互动</div>
            <span>COMMUNITY</span>
          </li>
          <li>
            <div>玩家支持</div>
            <span>PLAYER</span>
          </li>
          <li>
            <div>IP新游</div>
            <span>NEW GAMES</span>
          </li>
        </ul>
        <div class="right">
          <img
            src="//game.gtimg.cn/images/yxzj/web201706/images/comm/nav_search.png"
            alt=""
          />
          <img
            src=""
            alt=""
          />
          <div>
            <div>欢迎登录</div>
            <span>登录后查看游戏战绩</span>
          </div>
        </div>
      </div>
      <div class="hidden">
        <div>
          <span>版本介绍</span>
          <span>攻略中心</span>
          <span>KPL</span>
          <span>荣耀-传承</span>
          <span>创意互动营</span>
          <span>腾讯游戏防沉迷</span>
          <span>王者荣耀-世界</span>
        </div>
        <div>
          <span>游戏介绍</span>
          <span>攻略中心</span>
          <span>KPL</span>
          <span>荣耀-传承</span>
          <span>创意互动营</span>
          <span>腾讯游戏防沉迷</span>
          <span>代号破晓</span>
        </div>
        <div>
          <span>英雄资料</span>
          <span>攻略中心</span>
          <span>KPL</span>
          <span>荣耀-传承</span>
          <span>创意互动营</span>
          <span>腾讯游戏防沉迷</span>
          <span>代号-启程</span>
        </div>
        <div>
          <span>爆料站 &nbsp; &nbsp;</span>
          <span>攻略中心</span>
          <span>KPL</span>
          <span>荣耀-传承</span>
          <span>创意互动营</span>
          <span>客服专区</span>
        </div>
        <div>
          <span>世界观体验站</span>
          <span>攻略中心</span>
          <span>KPL</span>
          <span>荣耀-传承</span>
          <span>创意互动营</span>
          <span>礼包兑换</span>
        </div>
        <div>
          <span>游戏壁纸</span>
          <span>攻略中心</span>
          <span>KPL</span>
          <span>荣耀-传承</span>
          <span>创意互动营</span>
          <span>自动服务</span>
        </div>
        <div>
          <span>媒体入驻</span>
          <span>全民赛</span>
          <span>龙翼王者卡</span>
        </div>
        <div>
          <span>赛事数据</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    go(x) {
      if (this.$route.path == x) return;
      this.$router.push(x);
    },
  },
};
</script>

<style lang="scss" scoped>
.header {
  .f1 {
    background-color: rgba(6, 6, 7, 0.759);
    &:hover > .hidden {
      height: 285px;
      border-top: 3px solid rgb(6, 6, 7);
    }
    .container {
      align-items: center;
      display: flex;
      height: 84px;
      width: 1300px;
      margin: 0 auto;
      > * {
        cursor: pointer;
      }
      ul {
        padding-top: 16px;
        margin-left: 40px;
        display: flex;
        color: rgba(255, 255, 255, 0.192);
        height: 100%;
        li {
          padding-top: 4px;
          height: 100%;
          margin-right: 10px;
          text-align: center;
          width: 110px;
          &:hover {
            background-image: linear-gradient(
              0deg,
              rgba(255, 166, 0, 0.152) 0,
              rgba(255, 166, 0, 0) 100%
            );
            border-bottom: 3px solid orange;
            & > * {
              color: rgba(255, 166, 0, 0.586);
            }
          }
          div {
            font-size: 18px;
            color: rgb(201, 201, 221);
          }
          span {
            display: inline-block;
            font-size: 12px;
            color: gray;
            padding-top: 8px;
          }
        }
      }
      .right {
        margin-left: auto;
        display: flex;
        align-items: center;
        img {
          &:first-child {
            margin-right: 28px;
            margin-top: -2px;
          }
          &:nth-child(2) {
            margin-right: 8px;
            border: 1px solid orange;
            border-radius: 50%;
          }
        }
        > div {
          > div {
            color: white;
            font-size: 18px;
          }
          > span {
            color: gray;
            font-size: 12px;
          }
        }
      }
    }
    .hidden {
      position: absolute;
      color: white;
      overflow: hidden;
      height: 0;
      width: 100%;
      background-color: rgba(10, 10, 10, 0.432);
      transition: 0.2s;
      > div {
        // border: 1px solid red;
        width: 760px;
        margin: 0 auto;
        // display: flex;
        // justify-content: space-around;
        margin-top: 10px;
        > span {
          padding-right: 30px;
          // width: 128px;
          display: inline-block;
          // border: 1px solid blue;
          cursor: pointer;
          &:hover {
            color: orange;
            text-decoration: underline;
          }
        }
      }
    }
  }
}
</style>